﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using DAL;

namespace _14期Razor引擎
{
    /// <summary>
    /// listRazor 的摘要说明
    /// </summary>
    public class listRazor : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/html";
            DataTable dt = (SqlHelper.ExecuteDataSetText("select * from MyClass")).Tables[0];
            RazorHelper.Render("list.html",dt,new RazorHelper.IncludeType()
            {
                Title = "Top2",
                Content = "Top.html",IsFile = true
            });

        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}